<template>
<view>
<image class="succes_tp" mode="widthFix" src="http://imgbdb3.bendibao.com/whbdb/20215/11/20210511101623_25308.jpeg"></image>
<view class="succes_h2">对不起，您不符合办理条件</view>
<view class="succes_p anniu_x60" v-if="desc" @tap="failNavi">
  <view class="fail-text">
    <text>具体原因如下：</text>
  </view>
  <view class="fail-desc">
    <text>{{desc}}</text>
  </view>
</view>
<view class="anniu_1">
  <navigator url="/pages/index/index" open-type="reLaunch">返回首页</navigator>
</view>
<view class="anniu_2">
  <navigator delta="1" open-type="navigateBack">返回上一步</navigator>
</view>
<view class="share">
  <view class="head">
    <view class="line"></view>
    <view class="text">分享给朋友测试</view>
    <view class="line"></view>
  </view>
  <button open-type="share" hover-class="btn">
    <image src="/static/images/share/group.png" class="wechat"></image>
  </button>
</view>
<!-- <collection collectionData="{{collectionData}}" scroll="{{scroll}}" onopenCollection="openCollection" oncloseCollection="closeCollection"></collection> -->
</view>
</template>

<script>
let _options;
let model_id;
const app = getApp();
let util = require("../../../../../utils/util.js");
let toggleCollection = true;

export default {
  data() {
    return {
      scroll: false,
      desc: ""
    };
  },

  components: {},
  props: {},
  onLoad: function (options) {
    // util.colleation(this, '', "1");
    toggleCollection = true;
    model_id = options.model_id;

    if (options.desc != undefined) {
      _options = options;
      this.setData({
        desc: options.desc.split("#")[0]
      });
    }
  },
  onShareAppMessage: function () {
    return {
      path: `/pages/tools/banshi/problem/item/item?model_id=${model_id}`,
      imageUrl: app.globalData.shareImage ? app.globalData.shareImage : "http://imgbdb3.bendibao.com/xcxbdb/file/20212/9/20210209161843_68677.jpg",
      title: "本地宝"
    };
  },
  methods: {
    failNavi() {
      let id = _options.desc.split("#")[1];
    },

    onPageScroll() {
      if (toggleCollection) {
        this.setData({
          scroll: true
        });
        toggleCollection = false;
      }
    },

    closeCollection() {
      toggleCollection = false;
    },

    openCollection() {
      toggleCollection = true;
    }

  }
};
</script>
<style>
/* pages/index/failure.wxss */

page {
    padding: 0 40rpx;
    box-sizing: border-box;
  }
  
  .succes_tp {
    width: 344rpx;
    height: 284rpx;
     margin: 0 auto; display: block; margin-top: 100rpx;
  }
  
  .succes_h2 {
    color: #868686;
  }
  
  .fail-text {
    color: #232323;
    margin-bottom: 8rpx;
  }
  
  .fail-desc {
    color: #BCBCBC;
    font-size: 28rpx;
  }
  
  .share {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .head {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 146rpx;
  }
  
  .line {
    width: 52rpx;
    border-bottom: 2rpx solid #D5D5D5;
  }
  
  .text {
    margin: 0 18rpx;
  }
  
  .wechat {
    height: 97rpx;
    width: 97rpx;
    margin-top: 30rpx;
  }

  /**succes css 开始**/
/* .succes_tp{ width: 160rpx; margin: 0 auto; display: block; margin-top: 100rpx;} */
.succes_h2{ text-align: center; font-size: 36rpx; margin:60rpx 0; color: #000}
.succes_p{font-size: 32rpx; margin-top: 20rpx; color: #666; padding: 28rpx; border-radius: 16rpx;box-shadow: 0 0 12rpx  rgba(0,0,0,0.16)}
.anniu_1{ width: 86%; height: 92rpx; margin: 0 auto; line-height: 92rpx; text-align: center; color: #f60; border-radius: 46rpx;border: 2rpx solid #f60; font-size: 36rpx;}
.anniu_x60{ margin-bottom: 60rpx;}
.anniu_2{ width: 86%; height: 92rpx; background: linear-gradient(to right, #FFAA00, #FF6600); margin: 0 auto; line-height: 92rpx; text-align: center; color: #fff; border-radius: 46rpx; font-size: 36rpx; margin-top: 40rpx;  box-sizing: border-box;}
button {background-color: transparent}
button::after {border: 0}
</style>